package com.ruoyi.sales.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 售后服务记录业务对象 sales_record
 *
 * @author ruoyi
 * @date 2025-08-30
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class SalesRecordBo extends BaseEntity {

    /**
     * 售后服务记录表ID
     */
    @NotNull(message = "售后服务记录表ID不能为空", groups = { EditGroup.class })
    private Long saleId;

    /**
     * 服务开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "服务开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date serviceStartDate;

    /**
     * 服务结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "服务结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date serviceEndDate;

    /**
     * 用户名称
     */
    @NotBlank(message = "用户名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String username;

    /**
     * 产品名称
     */
    @NotBlank(message = "产品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productName;

    /**
     * 产品型号
     */
    private String productModel;

    /**
     * 服务内容
     */
    @NotBlank(message = "服务内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String serviceContent;

    /**
     * 产品编号
     */
    private String productNumber;

    /**
     * 服务人员
     */
    @NotBlank(message = "服务人员不能为空", groups = { AddGroup.class, EditGroup.class })
    private String serviceStaff;

    /**
     * 销售员
     */
    @NotBlank(message = "销售员不能为空", groups = { AddGroup.class, EditGroup.class })
    private String salesperson;

    /**
     * 联系人
     */
    @NotBlank(message = "联系人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contact;

    /**
     * 联系电话
     */
    @NotBlank(message = "联系电话不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 11, message = "联系电话长度不能超过{max}个字符")
    private String contactNumber;


}
